﻿using System;
using Close.io.Client;
using Newtonsoft.Json;

namespace Close.io.API
{
	public class Task : CloseIoLeadObject, IIdentifiable
	{

		[JsonProperty(PropertyName = "due_date")]
		public DateTime? DueDate { get; set; }

		[JsonProperty(PropertyName = "text")]
		public string Text { get; set; }

		[JsonProperty(PropertyName = "assigned_to")]
		public string AssignedTo { get; set; }

		[JsonProperty(PropertyName = "assigned_to_name")]
		public string AssignedToName { get; private set; }

		[JsonProperty(PropertyName = "is_complete")]
		public bool? IsComplete { get; set; }

		public Task(DateTime? dueDate, string text, string assignedTo, bool? isComplete)
		{
			DueDate = dueDate;
			Text = text;
			AssignedTo = assignedTo;
		 
			IsComplete = isComplete;
		}

		public Task()
		{
			
		}
	}
}